Chapter 6 - Windows and Menus
This is the fourth of eight chapters that discuss the OpenDoc programming interface in detail. This chapter describes how your part editor can present and manipulate some of the major elements of its user interface.This chapter is a continuation of the previous chapter: it discusses programming issues involved with your part's user interface. Detailed design guidelines and recommendations for how your user interface should look and act are presented in Part 3 of this book and also in Macintosh Human Interface Guidelines.
Before reading this chapter, you should be familiar with the concepts presented in Chapter 1, "Introduction to OpenDoc," and Chapter 2, "Development Overview." For additional concepts related to your part editor's runtime environment, see Chapter 11, "OpenDoc Runtime Features."
This chapter discusses the following topics:
- windows
- dialog boxes
- controls
- menus
- undo
Chapter Contents
- Windows
- Creating and Using Windows
- The Window State Object
- Creating and Registering a Window
- Allocating Window Memory Efficiently
- Opening a Window
- Window IDs
- Closing a Window
- Storing and Retrieving Window Characteristics
- The Open Method of Your Part Editor
- Handling Window Events
- Zooming
- Resizing
- Closing
- Dragging
- Modal Dialog Boxes
- Acquiring and Relinquishing the Modal Focus
- Event Filters
- Handling a Simple Modal Dialog Box
- Handling a Movable Modal Dialog Box
- Modeless Dialog Boxes
- Showing the Dialog Box
- Closing the Dialog Box
- Hiding a Dialog Box When Deactivating a Frame
- Controls
- Design Issues for Controls
- Handling Events in Controls
- Sharing Palettes and Utility Windows
- Using a Tool Palette to Embed Parts
- Menus
- Setting Up Menus
- The Base Menu Bar
- Adding Part Menus to the Base Menu Bar
- Registering and Retrieving Command IDs
- Mac OS Menu IDs
- Obtaining the Menu Focus
- Enabling and Disabling Menus and Commands
- Menus and Movable Modal Dialog Boxes
- Menus and Read-Only Documents
- Menus and the Root Part
- The Document Menu
- Open Selection
- Insert
- Page Setup
- The Edit Menu
- Undo, Redo
- Cut, Copy, Paste
- Paste As
- Clear
- Select All
- Selection Info
- Editor Preferences
- View in Window
- Show Frame Outline
- Undo
- Multilevel, Cross-Document Capability
- Implementing Undo
- Adding an Action to the Undo Action History
- Adding Multistage Actions
- Creating an Action Subhistory
- Undoing an Action
- Redoing an Action
- Clearing the Action History
- Undo and Embedded Frames
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help